package cn.lingyueblog.gulimall.ware.feign;

import cn.lingyueblog.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 远程查询信息
     *
     * 1) 让所有请求过网关
     *  ① @FeignClient("gulimall-product")：给gulimall-product所在的机器发送请求
     *  ② /api/product/skuinfo/info/{skuId}
     * 2) 直接让后台指定服务处理
     *  ① @FeignClient("gulimall-gateway")
     *  ② /product/skuinfo/info/{skuId}
     */
    @RequestMapping("/prodct/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
